package com.matt.domain.course;

import com.matt.commons.model.Domain;
import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;

/**
 * *******************************
 * Created by Ron.
 * form com.matt
 * on 2017/9/5
 * *******************************
 */
@Entity
@Table(name = "children_course_item")
@Data
@EqualsAndHashCode(callSuper = true)
public class ChildrenCourseItem extends Domain {

    @Column(columnDefinition = " int DEFAULT 1 COMMENT '状态 1:未上 2：已上 3：旷课 4：请假 ' ")
    private Integer status = 0;

    @Column(columnDefinition = " varchar(32)  COMMENT ' 对应宝宝排好的课程包id （冗余）可为空，若该课程已结束，则置为空' ")
    private String childrenCourseId;

    @Column(columnDefinition = " varchar(32)  COMMENT ' 对应宝宝排好的课程包历史id ' ")
    private String childrenCourseHistoryId;

    @Column(columnDefinition = " varchar(32)  COMMENT ' 对应排好课程id ' ")
    private String coursePlanId;

    @Column(columnDefinition = " varchar(32)  COMMENT ' 对应宝宝id ' ")
    private String childrenId;

    @Column(columnDefinition = " varchar(32)  COMMENT ' 对应教师id ' ")
    private String teacherId;

    @Column(columnDefinition = " varchar(32)  COMMENT ' 对应评测id ' ")
    private String evaluateRecordId;

    @Column(columnDefinition = " varchar(50)  COMMENT ' 每个子课程备注信息 ' ")
    private String remark;

    public static ChildrenCourseItem of(Integer status , String childrenCourseId, String childrenId, String teacherId, String coursePlanId){
        ChildrenCourseItem item = new ChildrenCourseItem();
        item.setStatus(status);
        item.setChildrenCourseId(childrenCourseId);
        item.setChildrenId(childrenId);
        item.setCoursePlanId(coursePlanId);
        item.setTeacherId(teacherId);
        return item;
    }
}
